﻿using Mbl.ParameterizedTest.FluentCollectionBuilding.Expectors.GeneralExpectations;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace NParameterizedTestTests.Expectations
{
    [TestClass]
    public class ExceptionExpectationTests
    {
        [TestMethod]
        public void Does_not_hold_if_no_exception_is_thrown()
        {
            var expectation = new ExceptionExpectation<int, IndexOutOfRangeException>();
            var result = expectation.HoldsFor(() => 0);

            Assert.IsFalse(result.Holds, "Expectation must fail if no exception is thrown");
        }
    }
}
